﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleInjector;
using Core.ApplicationServices;
using Infrastructure.ApplicationServices;
using Core.DomainServices;
using Core.Model;
using Infrastructure.DomainServices;
using Infrastructure.DomainServices.Hdiphone6wallpaper;
using Infrastructure.DomainServices.Iphonewalls;

namespace CompositionRoot
{
    public static class DependencyRegister
    {
        public static Container Register()
        {
            var container = new Container();
            container.Register<IConfigurable, Config>();
            container.Register<IRepository, FileWriter>();
            container.RegisterCollection(typeof(IArticleCrawlable), new []{
                typeof(Hdiphone6wallpaperCrawable),
                typeof(IphonewallsCrawable)
            });
            container.RegisterCollection(typeof(ICategoryCrawlable), new[]{
                typeof(WebsiteHdiphone6wallpaper),
                typeof(WebsiteIphonewalls)
            });


            container.Register<IBatchProcess, BatchProcess>();
            return container;
        }
    }
}
